package com.anysoft.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/interceptor")
public class InterceptorPracController {
    @RequestMapping("/testinterceptor")
    public ModelAndView testInterceptor(Model model){
        model.addAttribute("msg","渲染视图dointerceptor.jsp");
        System.out.println("执行请求处理方法testinterceptor");
        return new ModelAndView("dointerceptor");
    }

    @RequestMapping("/testexclude")
    public ModelAndView testExclude(Model model){
        model.addAttribute("msg","渲染视图doexclude.jsp");
        System.out.println("执行请求处理方法testexclude");
        return new ModelAndView("doexclude");
    }
}
